<body class="app">
<% is_thredded = content_for?(:thredded_page_id) %>
<%= content_tag :div,
                class: 'app-container',
                id: ('app-page-container' unless is_thredded),
                'data-locale' => I18n.locale do %>
  <%= render 'shared/header' %>
  <%= render 'shared/flash_messages' unless is_thredded %>
  <div class="app-content-container"><%= yield %></div>
  <%# If the app JS is loaded via an [async] script, the JS may
  run before or after DOMContentLoaded. Expose a flag, so it can
  initialize correctly. %>
  <script data-turbolinks-eval="false">
    document.addEventListener('DOMContentLoaded', function() {
      (window.App = window.App || {}).DOMContentLoadedFired = true;
    });
  </script>
<% end %>
</body>
